package com.smarthome.core.dictionary.impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.smarthome.base.service.ShAccountLogTypeService;
import com.smarthome.core.dictionary.AccountLogTypeService;
import com.smarthome.domain.bean.ShAccountLogType;
import com.smarthome.domain.vo.boss.DataGrid;
import com.smarthome.domain.vo.boss.PageHelper;

/**
 * 
* @author zyf
* @date 2015年9月10日 下午8:36:47
* @version 1.0
* @Description: 平台用户日志类型业务实现类
 */
@Service("acountLogTypeService")
public class AccountLogTypeServiceImpl implements AccountLogTypeService {
	
	@Resource
	private ShAccountLogTypeService logTypeService;
	
	@Override
	public DataGrid queryDatagrid(ShAccountLogType queryLogType, PageHelper page) {
		return logTypeService.queryDatagrid(queryLogType, page);
	}

	@Override
	public List<ShAccountLogType> queryAccountLogTypeList(
			ShAccountLogType queryLogType) {
		return logTypeService.selectEntryList(queryLogType);
	}

	@Override
	public ShAccountLogType queryAccountLogTypeById(Long id) {
		return logTypeService.selectEntryById(id);
	}

	@Override
	public void add(ShAccountLogType accountLogType) {
		logTypeService.saveOrUpdate(accountLogType);
	}

	@Override
	public void edit(ShAccountLogType accountLogType) {
		logTypeService.saveOrUpdate(accountLogType);
	}

	@Override
	public void delete(Long id) {
		ShAccountLogType logtype=logTypeService.selectEntryById(id);
		logtype.setIsDel(1L);
		logTypeService.saveOrUpdate(logtype);
	}

}
